//
//  LFBHomeController.m
//  LFBLoveFreshBee
//
//  Created by 丁鼎 on 16/8/18.
//  Copyright © 2016年 丁鼎. All rights reserved.
//

#import "LFBHomeViewController.h"
#import "LFBNavBar.h"
#import "LFBNetworkingTool.h"
#import "LFBProductView.h"
#import "LFBSearchViewController.h"

@interface LFBHomeViewController ()<LFBNavBarDelegate>



@end

@implementation LFBHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationController.navigationBar.hidden = YES;
    
    self.view.backgroundColor = [UIColor redColor];
    
    LFBNavBar *nav = [[LFBNavBar alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 64)];
    
    nav.navdelegate = self;
    
    [self.view addSubview:nav];
    
    
    [[LFBNetworkingTool sharedTool] getdataWithRequestTpye:LFBRequestTypeHome WithSuccessBlock:^(id responseObject) {
        NSLog(@"%@",responseObject);
    } OrFailureBlock:^(NSError *error) {
        NSLog(@"%@",error);
    }];


}


-(void)clickScanBtn:(LFBNavBar *)navbar{
    
    NSLog(@"%s",__func__);
    
}
-(void)clickSearchBtn:(LFBNavBar *)navbar
{
    LFBSearchViewController *searchController = [[LFBSearchViewController alloc]init];
    [self.navigationController pushViewController:searchController animated:NO];

    
}

- (void)actionSearch
{
    NSLog(@"aa");
}

-(void)clickAddressTitle:(LFBNavBar *)navbar{
    NSLog(@"%s",__func__);
}

@end
